| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkGraphics::CompositorNode Class Reference

A node in the rendering graph described by a Compositor. More...

Inheritance diagram for nkGraphics::CompositorNode:

## Public Member Functions
| CompositorNode (System *system) noexcept
| CompositorNode (const CompositorNode &)=delete
virtual | ~CompositorNode ()
nkMemory::StringView | getName () const
Compositor * | getParentCompositor () const
bool | getActive () const
void | setName (const nkMemory::StringView &name)
void | setParentCompositor (Compositor *value)
virtual void | setActive (bool value)
TargetOperations * | addOperations ()
TargetOperations * | getOperations (unsigned int index) const
unsigned int | getOperationsCount () const
virtual void | deleteOperations (unsigned int index)
virtual void | changeOperationsOrder (unsigned int fromIndex, unsigned int toIndex)
virtual void | renderOperations ()
virtual void | exportClassToTree (nkExport::Node *rootNode) override
virtual void | importClassFromTree (nkExport::Node *rootNode) override
CompositorNode & | operator= (const CompositorNode &)=delete
Public Member Functions inherited from nkExport::Exportable
| Exportable () noexcept
virtual | ~Exportable ()

## Detailed Description

A node in the rendering graph described by a Compositor.

## Constructor & Destructor Documentation

## ◆ CompositorNode() [1/2]

nkGraphics::CompositorNode::CompositorNode | ( | System * | system | ) |
| noexcept

Constructor. In theory, should never be called by external code, see Compositor::addNode().

Parameters

  system | The system the resource should live in.

## ◆ CompositorNode() [2/2]

nkGraphics::CompositorNode::CompositorNode | ( | const CompositorNode & |  | ) |
| delete

Copy constructor.

## ◆ ~CompositorNode()

virtual nkGraphics::CompositorNode::~CompositorNode | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ getName()

nkMemory::StringView nkGraphics::CompositorNode::getName | ( |  | ) | const

Returns
  The name attached to the node.

## ◆ getParentCompositor()

Compositor* nkGraphics::CompositorNode::getParentCompositor | ( |  | ) | const

Returns
  The parent compositor.

## ◆ getActive()

bool nkGraphics::CompositorNode::getActive | ( |  | ) | const

Returns
  Whether the node is active (true) or not (false).

## ◆ setName()

void nkGraphics::CompositorNode::setName | ( | const nkMemory::StringView & | name | ) |

Sets the name used by the node.

Parameters

  name | The name to use.

## ◆ setParentCompositor()

void nkGraphics::CompositorNode::setParentCompositor | ( | Compositor * | value | ) |

Sets the parent compositor.

Parameters

  value | The compositor to mark as parent.

## ◆ setActive()

virtual void nkGraphics::CompositorNode::setActive | ( | bool | value | ) |
| virtual

Activates or not the node for rendering. A deactivated node won't participate in the rendering pipeline.

Parameters

  value | If the node is active (true) or not (false).

## ◆ addOperations()

TargetOperations* nkGraphics::CompositorNode::addOperations | ( |  | ) |

Adds an operation within the node.

Returns
  The newly created operation. The node owns the memory allocated, external code should never delete it. See deleteOperations().

## ◆ getOperations()

TargetOperations* nkGraphics::CompositorNode::getOperations | ( | unsigned int | index | ) | const

Returns an existing operation.

Parameters

  index | The index if the operation to retrieve.

## ◆ getOperationsCount()

unsigned int nkGraphics::CompositorNode::getOperationsCount | ( |  | ) | const

Returns
  The number of operations active in the node.

## ◆ deleteOperations()

virtual void nkGraphics::CompositorNode::deleteOperations | ( | unsigned int | index | ) |
| virtual

Erases and frees the memory of an operation.

Parameters

  index | The index of the operation to free.

## ◆ changeOperationsOrder()

virtual void nkGraphics::CompositorNode::changeOperationsOrder | ( | unsigned int | fromIndex,
|  | unsigned int | toIndex
| ) |  |
| virtual

Changes the order of operations within the node. This changes the rendering, as currently the operations are executed sequentially.

Parameters

  fromIndex | The index of the target to move.
  toIndex | The index to which the operation should be moved.

## ◆ renderOperations()

virtual void nkGraphics::CompositorNode::renderOperations | ( |  | ) |
| virtual

Triggers a rendering. In theory, should never be called by external code. Prefer to use Compositor::renderChain.

## ◆ exportClassToTree()

virtual void nkGraphics::CompositorNode::exportClassToTree | ( | nkExport::Node * | rootNode | ) |
| override virtual

Basic exporting capabilities.

Parameters

  rootNode | The tree to export to.

Implements nkExport::Exportable.

## ◆ importClassFromTree()

virtual void nkGraphics::CompositorNode::importClassFromTree | ( | nkExport::Node * | rootNode | ) |
| override virtual

Basic importing capabilities.

Parameters

  rootNode | The tree to import from.

Implements nkExport::Exportable.

## ◆ operator=()

CompositorNode& nkGraphics::CompositorNode::operator= | ( | const CompositorNode & |  | ) |
| delete

Copy operator.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Compositors/CompositorNode.h